Update billto for a shipment [Deprecated]
curl --request PATCH \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId} \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethod": "Visa Credit",
"cardIdentifier": "1234",
"amount": 149.99,
"address": {
"attention": "Leave at the back door.",
"street1": "123 Main Street",
"street2": "ABC Boulevard",
"city": "Seattle",
"state": "WA",
"country": "United States of America",
"zipCode": "10008-1234",
"kind": "TBD",
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc"
}
}
'import requests
url = "https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}"
payload = {
"paymentMethod": "Visa Credit",
"cardIdentifier": "1234",
"amount": 149.99,
"address": {
"attention": "Leave at the back door.",
"street1": "123 Main Street",
"street2": "ABC Boulevard",
"city": "Seattle",
"state": "WA",
"country": "United States of America",
"zipCode": "10008-1234",
"kind": "TBD",
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
paymentMethod: 'Visa Credit',
cardIdentifier: '1234',
amount: 149.99,
address: {
attention: 'Leave at the back door.',
street1: '123 Main Street',
street2: 'ABC Boulevard',
city: 'Seattle',
state: 'WA',
country: 'United States of America',
zipCode: '10008-1234',
kind: 'TBD',
name: {first: 'John', last: 'Smith'},
email: 'johnsmith@fabric.inc'
}
})
};
fetch('https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paymentMethod' => 'Visa Credit',
'cardIdentifier' => '1234',
'amount' => 149.99,
'address' => [
'attention' => 'Leave at the back door.',
'street1' => '123 Main Street',
'street2' => 'ABC Boulevard',
'city' => 'Seattle',
'state' => 'WA',
'country' => 'United States of America',
'zipCode' => '10008-1234',
'kind' => 'TBD',
'name' => [
'first' => 'John',
'last' => 'Smith'
],
'email' => 'johnsmith@fabric.inc'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}"
payload := strings.NewReader("{\n \"paymentMethod\": \"Visa Credit\",\n \"cardIdentifier\": \"1234\",\n \"amount\": 149.99,\n \"address\": {\n \"attention\": \"Leave at the back door.\",\n \"street1\": \"123 Main Street\",\n \"street2\": \"ABC Boulevard\",\n \"city\": \"Seattle\",\n \"state\": \"WA\",\n \"country\": \"United States of America\",\n \"zipCode\": \"10008-1234\",\n \"kind\": \"TBD\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n },\n \"email\": \"johnsmith@fabric.inc\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": \"Visa Credit\",\n \"cardIdentifier\": \"1234\",\n \"amount\": 149.99,\n \"address\": {\n \"attention\": \"Leave at the back door.\",\n \"street1\": \"123 Main Street\",\n \"street2\": \"ABC Boulevard\",\n \"city\": \"Seattle\",\n \"state\": \"WA\",\n \"country\": \"United States of America\",\n \"zipCode\": \"10008-1234\",\n \"kind\": \"TBD\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n },\n \"email\": \"johnsmith@fabric.inc\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethod\": \"Visa Credit\",\n \"cardIdentifier\": \"1234\",\n \"amount\": 149.99,\n \"address\": {\n \"attention\": \"Leave at the back door.\",\n \"street1\": \"123 Main Street\",\n \"street2\": \"ABC Boulevard\",\n \"city\": \"Seattle\",\n \"state\": \"WA\",\n \"country\": \"United States of America\",\n \"zipCode\": \"10008-1234\",\n \"kind\": \"TBD\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n },\n \"email\": \"johnsmith@fabric.inc\"\n }\n}"
response = http.request(request)
puts response.read_body{
"paymentMethod": "Visa Credit",
"cardIdentifier": "1234",
"amount": 149.99,
"address": {
"street1": "123 Main Street",
"city": "Seattle",
"state": "WA",
"country": "United States of America",
"zipCode": "10008-1234",
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc",
"attention": "Leave at the back door.",
"street2": "ABC Boulevard",
"kind": "TBD",
"phone": {
"number": "123-456-7890",
"kind": "Mobile"
}
},
"billToId": 1,
"cart": "5e5818a84d030c206b2ffb02",
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"__v": 0
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Bill To
Update billto for a shipment [Deprecated]
Update billto for a shipment
PATCH
/
api-cart
/
cart
/
{cartId}
/
bill-to
/
{billToId}
Update billto for a shipment [Deprecated]
curl --request PATCH \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId} \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethod": "Visa Credit",
"cardIdentifier": "1234",
"amount": 149.99,
"address": {
"attention": "Leave at the back door.",
"street1": "123 Main Street",
"street2": "ABC Boulevard",
"city": "Seattle",
"state": "WA",
"country": "United States of America",
"zipCode": "10008-1234",
"kind": "TBD",
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc"
}
}
'import requests
url = "https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}"
payload = {
"paymentMethod": "Visa Credit",
"cardIdentifier": "1234",
"amount": 149.99,
"address": {
"attention": "Leave at the back door.",
"street1": "123 Main Street",
"street2": "ABC Boulevard",
"city": "Seattle",
"state": "WA",
"country": "United States of America",
"zipCode": "10008-1234",
"kind": "TBD",
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
paymentMethod: 'Visa Credit',
cardIdentifier: '1234',
amount: 149.99,
address: {
attention: 'Leave at the back door.',
street1: '123 Main Street',
street2: 'ABC Boulevard',
city: 'Seattle',
state: 'WA',
country: 'United States of America',
zipCode: '10008-1234',
kind: 'TBD',
name: {first: 'John', last: 'Smith'},
email: 'johnsmith@fabric.inc'
}
})
};
fetch('https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paymentMethod' => 'Visa Credit',
'cardIdentifier' => '1234',
'amount' => 149.99,
'address' => [
'attention' => 'Leave at the back door.',
'street1' => '123 Main Street',
'street2' => 'ABC Boulevard',
'city' => 'Seattle',
'state' => 'WA',
'country' => 'United States of America',
'zipCode' => '10008-1234',
'kind' => 'TBD',
'name' => [
'first' => 'John',
'last' => 'Smith'
],
'email' => 'johnsmith@fabric.inc'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}"
payload := strings.NewReader("{\n \"paymentMethod\": \"Visa Credit\",\n \"cardIdentifier\": \"1234\",\n \"amount\": 149.99,\n \"address\": {\n \"attention\": \"Leave at the back door.\",\n \"street1\": \"123 Main Street\",\n \"street2\": \"ABC Boulevard\",\n \"city\": \"Seattle\",\n \"state\": \"WA\",\n \"country\": \"United States of America\",\n \"zipCode\": \"10008-1234\",\n \"kind\": \"TBD\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n },\n \"email\": \"johnsmith@fabric.inc\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": \"Visa Credit\",\n \"cardIdentifier\": \"1234\",\n \"amount\": 149.99,\n \"address\": {\n \"attention\": \"Leave at the back door.\",\n \"street1\": \"123 Main Street\",\n \"street2\": \"ABC Boulevard\",\n \"city\": \"Seattle\",\n \"state\": \"WA\",\n \"country\": \"United States of America\",\n \"zipCode\": \"10008-1234\",\n \"kind\": \"TBD\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n },\n \"email\": \"johnsmith@fabric.inc\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/bill-to/{billToId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethod\": \"Visa Credit\",\n \"cardIdentifier\": \"1234\",\n \"amount\": 149.99,\n \"address\": {\n \"attention\": \"Leave at the back door.\",\n \"street1\": \"123 Main Street\",\n \"street2\": \"ABC Boulevard\",\n \"city\": \"Seattle\",\n \"state\": \"WA\",\n \"country\": \"United States of America\",\n \"zipCode\": \"10008-1234\",\n \"kind\": \"TBD\",\n \"name\": {\n \"first\": \"John\",\n \"last\": \"Smith\"\n },\n \"email\": \"johnsmith@fabric.inc\"\n }\n}"
response = http.request(request)
puts response.read_body{
"paymentMethod": "Visa Credit",
"cardIdentifier": "1234",
"amount": 149.99,
"address": {
"street1": "123 Main Street",
"city": "Seattle",
"state": "WA",
"country": "United States of America",
"zipCode": "10008-1234",
"name": {
"first": "John",
"last": "Smith"
},
"email": "johnsmith@fabric.inc",
"attention": "Leave at the back door.",
"street2": "ABC Boulevard",
"kind": "TBD",
"phone": {
"number": "123-456-7890",
"kind": "Mobile"
}
},
"billToId": 1,
"cart": "5e5818a84d030c206b2ffb02",
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"__v": 0
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Path Parameters
Required string length:
24Example:
"5e5818a84d030c206b2ffb02"
Required string length:
24Example:
"5e5818a84d030c206b2ffb02"
Body
application/json
Response
Bill To For Shipment Updated
Required string length:
3 - 24Example:
"Visa Credit"
Required string length:
4Example:
"1234"
Required range:
x >= 0.01Example:
149.99
Show child attributes
Show child attributes
Example:
1
Example:
"5e5818a84d030c206b2ffb02"
Example:
"5fee9d59f2f08a1b3cbdea08"
Example:
"2020-12-31T02:09:53.914Z"
Example:
"2020-12-31T02:09:53.914Z"
Example:
0
Was this page helpful?
⌘I
